/*----------------------------------------------------------------------
  - File name      : STC8Ax_WDT.h
  - Author         : Quark Team
  - Update date    : 2020-12-09                 
  -	Copyright      : Gevico Electronic studio   
  - Module comments: Header file of watchdog module.
-----------------------------------------------------------------------*/
#ifndef __STC8Ax_WDT_H_
#define __STC8Ax_WDT_H_
/*-----------------------------------------------------------------------
|                               INCLUDES                                |
-----------------------------------------------------------------------*/
/*--------------------------------------------------------
| @Description: STC8Ax Options                           |
--------------------------------------------------------*/
#include "STC8Ax_REG.h"   
/*--------------------------------------------------------
| @Description: STC8Ax core                              |
--------------------------------------------------------*/
#include "STC8Ax_CORE.h"
/*-----------------------------------------------------------------------
|                                 DATA                                  |
-----------------------------------------------------------------------*/
/*--------------------------------------------------------
| @Description: WDT clock ferquency division define      |
--------------------------------------------------------*/

#define      WDTCLK_DIV2    0x00
#define      WDTCLK_DIV4    0x01
#define      WDTCLK_DIV8    0x02
#define     WDTCLK_DIV16    0x03
#define     WDTCLK_DIV32    0x04
#define     WDTCLK_DIV64    0x05
#define    WDTCLK_DIV128    0x06
#define    WDTCLK_DIV256    0x07

/*-----------------------------------------------------------------------
|                             API FUNCTION                              |
-----------------------------------------------------------------------*/


/*--------------------------------------------------------
| @Description: Dog feeding function define              |
--------------------------------------------------------*/

#define   WDT_FEED()   WDT_CONTR |= 0x10

/*--------------------------------------------------------
| @Description: WDT function                             |
--------------------------------------------------------*/

uint32 Get_WDT_Time(void);
FSCSTATE WDT_Init(uint8 CLKDiv,FUNSTATE State);

#endif
/*-----------------------------------------------------------------------
|          END OF FLIE        (C) COPYRIGHT Gevico Electronics          | 
-----------------------------------------------------------------------*/
